<div class="row animated fadeInRight" id="positionIndex">
	<ol class="breadcrumb">
		<#if pMenu??>
		<li>${pMenu.name}</li> </#if>
		<li class="active">${menu.name}</li>
	</ol>

	<grid :data="gridData" :headers="gridHeaders" :columns="gridColumns" :major="majorKey" :resc="resource" :resc-name="resourceName" :buttons="buttons">
	</grid>	
</div>

<script>
	registerGrid("#grid-template");
	var vm=new Vue({
		el : "#positionIndex",
		data : {
			gridHeaders : ["编码","名称"],
			gridColumns : ["code","name"],
			majorKey:"code",
			resource:"position",
			resourceName:"职位",
			resourceURL:"/backend/position",
			buttons:{"add":true,"edit":true,"delete":true},
			gridData : []
		},
		ready : function() {
			this.$http.get(this.resourceURL).then(function(resp) {
				this.gridData = resp.data.items;
			});
		},
		events:{
			gridUpdateSuccess:function(resp,type){
				logs("type:"+type);
			}
		}
	});
		
</script>